dd.debug({
    init: function()
    {
        dd(dd.body).empty();
        dd(dd.body).css({
            margin: "0"
        });
        dd.log.extend({
            height: "200px",
            container: dd(dd.body).addElement("div", {
                style: {
                    backgroundColor: "#F1F1F1",
                    position: "absolute",
                    width: "100%",
                    bottom: "0",
                    marginTop: "14px",
                    height: "200px",
                    overflowX: "hidden",
                    overflowY: "scroll",
                    borderTop: "1px solid #BBB"
                }
            }),
            toggle: dd(dd.body).addElement("div", "...", {
                style: {
                    position: "absolute",
                    width: "100%",
                    textAlign: "center",
                    backgroundColor: "#F1F1F1",
                    display: "block",
                    lineHeight: "0px",
                    height: "13px",
                    textDecoration: "none",
                    color: "#666",
                    fontSize: "20px",
                    bottom: "200px",
                    borderTop: "1px solid #AAA",
                    cursor: "n-resize",
                    marginBottom: "1px"
                }
            }),
            func: function(message, level)
            {
                level = level || this.debug;
                var row = dd(dd.log.container).addElement("div", message, {
                    style: {
                        padding: "2px 8px",
                        borderBottom: "1px dotted #CCC",
                        fontFamily: "Consolas,Courier New,mono-space",
                        fontSize: "12px",
                        lineHeight: "14px",
                        whiteSpace: "pre"
                    }
                });
                switch(level)
                {
                    case "error":
                        dd(row).css({backgroundColor:"#FDD"});
                        break;
                    case "responseSuccess":
                        dd(row).css({
                            backgroundColor: "#CFC",
                            whiteSpace: "pre",
                            borderLeft: "8px solid #7F7"
                        });
                        break;
                    case "responseFailure":
                        dd(row).css({
                            backgroundColor: "#FCC",
                            whiteSpace: "pre",
                            borderLeft: "8px solid #F77"
                        });
                        break;
                    default:
                        dd(row).css({backgroundColor:"#FFC"});
                }
                dd(dd.log.container).scrollTop(dd(dd.log.container).scrollHeight());
            },
            responseFailure: "responseFailure",
            responseSuccess: "responseSuccess"
        });
        dd.event({
            keypress: function()
            {
                if(this.key.code == 96)
                {
                    var display = dd(dd.log.container).toggle();
                    if(display)
                    {
                        dd(dd.log.toggle).css({ bottom: dd.log.height });
                    }
                    else
                    {
                        dd.log.height = dd(dd.log.toggle).css("bottom");
                        dd(dd.log.toggle).css({ bottom: "0" });
                    }
                }
            }
        });
        dd(dd.log.toggle).event({
            dblclick: function()
            {
                var display = dd(dd.log.container).toggle();
                if(display)
                {
                    dd(dd.log.toggle).css({ bottom: dd.log.height });
                }
                else
                {
                    dd.log.height = dd(dd.log.toggle).css("bottom");
                    dd(dd.log.toggle).css({ bottom: "0" });
                }
            },
            drag: function()
            {
                if(this.mouse.left)
                {
                    var cH = dd(dd.log.toggle).cssValue("bottom") - this.mouse.delta.y;
                    if(cH > -1)
                    {
                        var h = dd(dd.log.toggle).transform("bottom", cH > -1 ? -1 * this.mouse.delta.y : 0);
                        dd(dd.log.container).css({ height: h, display: "block" });
                    }
                }
            }
        });
    },
    assertNotNull: function()
    {
        dd.log("Not Implemented", dd.log.error);
    },
    assertEquals: function()
    {
        dd.log("Not Implemented", dd.log.error);
    }
});